package com.xian.gaoxiao.ui.widget;


import com.xian.gaoxiao.ui.activity.MainAc;
import com.xian.gaoxiao.utils.Utilities;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public class TapLayout extends LinearLayout{

	
//	private static  final int UNFOCUS_MARGIN=4;
//	private static  final int FOCUS_MARGIN=50;
//	private static   int FOCUS_HEIGHT;
//	private static   int FOCUS_WIDTH;
//	private static   int UNFOCUS_HEIGHT;
//	private static   int UNFOCUS_WIDTH;
	
	private Context mContext;
	
	public TapLayout(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
		init(context);
	}

	public TapLayout(Context context, AttributeSet attrs) {
		super(context, attrs);
		// TODO Auto-generated constructor stub
		init(context);
	}
	
	private void init(Context context){
		mContext=context;
		
//		FOCUS_HEIGHT=Main.WIN_HEIGHT-FOCUS_MARGIN;
//		FOCUS_WIDTH=Main.WIN_WIDTH-FOCUS_MARGIN;
//		UNFOCUS_HEIGHT=(Main.WIN_HEIGHT-(int)Main.TITLE_HEIGHT)/2-UNFOCUS_MARGIN;
//		UNFOCUS_WIDTH=Main.WIN_WIDTH/2-UNFOCUS_MARGIN;
//		Utilities.print(FOCUS_HEIGHT+":"+FOCUS_WIDTH+":"+UNFOCUS_HEIGHT+":"+UNFOCUS_WIDTH);
	}
	public void setTapFocus(boolean bool){
//		android.view.ViewGroup.LayoutParams params=this.getLayoutParams();
//		if(bool){
//			params.height =FOCUS_HEIGHT; 
//			params.width = FOCUS_WIDTH;        
//			this.setLayoutParams(params);
//		}else{
//			params.height =UNFOCUS_HEIGHT; 
//			params.width = UNFOCUS_WIDTH;        
//			this.setLayoutParams(params);
//		}
	}

    @Override 
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 
        super.onMeasure(widthMeasureSpec, heightMeasureSpec); 
//        Utilities.print(System.currentTimeMillis()+":"+MeasureSpec.getSize(widthMeasureSpec)+":"+MeasureSpec.getSize(heightMeasureSpec)+":");
//        android.view.ViewGroup.LayoutParams params=this.getLayoutParams();
//		params.height =UNFOCUS_WIDTH; 
//		params.width = UNFOCUS_WIDTH;        
//		this.setLayoutParams(params);
    } 

}
